Some electronic devices (e.g., a mobile phone, a portable game console, etc.) provide a user interface that includes an on-screen keyboard (also called a soft keyboard) that allows a user to enter text into the user interface by touching virtual keys displayed on a touch-sensitive display device (sometimes called a touch screen display). Typically, the on-screen keyboard is a system keyboard that is provided by the operating system of the electronic device. In addition to providing the system keyboard, the operating system of the electronic device handles text manipulation events (e.g., insert, delete, select and replace commands) received from the system keyboard and provides enhanced keyboard functions such as spell checking When a third-party application requires text input from a user, the third-party receives information and/or commands from the system keyboard provided by the operating system of the electronic device. Unfortunately, the enhanced keyboard functions provided by the operating system often require contextual information, such as text (or other symbols) positioned before and/or after the current text or cursor position, and therefore the enhanced keyboard functions are not available to third-party applications that store contextual information in storage locations that unknown to the operating system, and/or that store contextual information in a manner (e.g., using data structures, formats, metadata, or the like) unknown to the operating system.